<!DOCTYPE html>
<!-- <html> -->
    <!-- <head> -->
        <title>{% block title %}{% endblock %} - Flaskr</title>
        <link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}">
    <!-- </head> -->
    <!-- <body> -->
        <nav>
            <h1>Flaskr</h1>
            <ul>
                {% if g.user %}
                    <li><span>{{ g.user['username'] }}</span></li>
                    <li>
                        <a href="{{ url_for('auth.logout') }}">Log out</a>
                    </li>
                {% else %}
                    <li>
                        <a href="{{ url_for('auth.register') }}">Register</a>
                        <a href="{{ url_for('auth.login') }}">Login</a>
                    </li>
                {% endif %}
            </ul>
        </nav>
        <section class="content">
            <header>
                {% block header %} {% endblock %}
                {% for message in get_flashed_messages() %}
                    <div class="flash"> {{message}} </div>
                {% endfor %}
                {% block content %} {% endblock %}
            </header>
        </section>
    <!-- </body> -->
<!-- </html> -->